package wangwenjun.phase2.concurrencypattern.eventbus.google.demo04;

import com.google.common.eventbus.Subscribe;
import lombok.extern.slf4j.Slf4j;

/**
 * @author ChangLiang
 * @date 2020/6/19
 */
@Slf4j
public class FruitEatenListener {

    @Subscribe
    public void eat(Fruit event) {
        log.info("fruit has been eaten [{}]", event);
    }

    @Subscribe
    public void eat(Apple event) {
        log.info("apple has been eaten [{}]", event);
    }
}
